package Server.Message;

import java.io.Serializable;


/**
 * This is our Message system we use to send messages between the client to the server.
 * all messages inherits from this class. every message has a unique purpose and it gets it 
 * type from the enum to the server or the client can identify what the message meaning is.
 */
public class Message implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public enum MessageType {
	    MESSAGE_LOGIN,
	    MESSAGE_LOGIN_REPLY,
	    MESSAGE_LOGOUT,
	    MESSAGE_GET_ALL_COURSES,
	    MESSAGE_GET_ALL_COURSES_REPLAY,
	    MESSAGE_GET_TUNIT,
	    MESSAGE_GET_TUNIT_REPLAY,
	    MESSAGE_GET_ALL_CLASS,
	    MESSAGE_GET_ALL_CLASS_REPLAY,
	    MESSAGE_GET_ALL_STUDENTS,
	    MESSAGE_GET_UNASSIGN_STUDENTS,
	    MESSAGE_GET_STUDENTS_REPLAY,
	    MESSAGE_ADD_CLASS,
	    MESSAGE_ADD_CLASS_REPLAY,
	    MESSAGE_GET_STUDENT_BY_CLASS,
	    MESSAGE_ASSIGN_STUDENT,
	    MESSAGE_NEW_SEMESTER,
	    MESSAGE_GET_CLASS_BY_COURSE,
	    MESSAGE_TEACHER_BY_UNIT,
	    MESSAGE_TEACHER_REPLAY,
	    MESSAGE_ADD_LESSON,
	    MESSAGE_TEACHER_LESSON,
	    MESSAGE_LESSON_REPLAY,
	    MESSAGE_ADD_TASK,
	    MESSAGE_UNASSGIN_COURSES,
	    MESSAGE_LESSON_BY_COURSE,
	    MESSAGE_SEND_REQUEST,
	    MESSAGE_GET_STUDENT_LESSON,
	    MESSAGE_GET_TASKID,
	    MESSAGE_GET_TASKID_REPLAY,
	    MESSAGE_GET_INFO,
	    MESSAGE_GET_INFO_REPLAY,
	    MESSAGE_GET_TASK_FILE,
	    MESSAGE_GET_FILE,
	    MESSAGE_GET_REQUEST,
	    MESSAGE_GET_REQUEST_REPLAY,
	    MESSAGE_SUBMIT_TASK,
	    MESSAGE_SUBMIT_TASK_REPLAY,
	    MESSAGE_DIS,
	    MESSAGE_APP,
	    MESSAGE_GET_PARENT,
	    MESSAGE_GET_PARENT_REPLAY,
	    MESSAGE_STUDENTS_IN_LESSON,
	    MESSAGE_GRADE_TASK,
	    MESSAGE_ASSESMENT_FORM,
	    MESSAGE_REPORT1,
	    MESSAGE_REPORT1_REPLAY,
	    MESSAGE_GET_SUBMITED_TASK,
	    MESSAGE_GET_SUBMITED_TASK_REPLAY,
	    MESSAGE_GET_SUBMITTED_FILE,
	    MESSAGE_REPORT2,
	    MESSAGE_REPORT2_REPLAY,
	    MESSAGE_REPORT3,
	    MESSAGE_REPORT3_REPLAY,
	    MESSAGE_PFS,
	    MESSAGE_PFS_REPLAY,
	    MESSAGE_PFR,
	    MESSAGE_PFR_REPLAY,
	    MESSAGE_PFT,
	    MESSAGE_PFT_REPLAY,
	    MESSAGE_GET_CHILDREN,
	    MESSAGE_GET_CHILDREN_REPLAY,
	    MESSAGE_GET_GRADE_FILE,
	    MESSAGE_TEACHER_TUNIT,
	    MESSAGE_ALL_LESSONS,
	    MESSAGE_REPORT,
	}
	
	private MessageType messageType;
	
	/**
	 **
	 * @param type Message type
	 */
	public Message(MessageType type){
		messageType = type;	
	}

	
	/**
	 * 
	 * @return Message type
	 */
	public MessageType getMessageType(){
		return messageType;	
	}
}